﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace SLIC.Models.Administration
{
    public class UserDataModel
    {
        public UserDataModel()
        {
        }

        public UserDataModel(EntityModel.User user)
        {
            // TODO: Complete member initialization
            this.UserId = user.UserId;
            this.firstName = user.FirstName;
            this.lastname = user.LastName;
            this.CSRCode = user.CSR_Code;
        }

        public int UserId { get; set; }

        [StringLength(10, ErrorMessage = "User Name cannot be more than 10 characters.")]
        public string username { get; set; }

        [ValidatePasswordLength(ErrorMessage = "Enter a strong passsword.")]
        public string password { get; set; }

        [Required]
        public string firstName { get; set; }

        public string lastname { get; set; }

        [Required]
        public string email { get; set; }

        public string CSRCode { get; set; }

        public string[] roles { get; set; } 

        public bool isLocked { get; set; }
    }
}